package net.crowdloud.server.DatabaseAccess.tags;

import javax.jdo.PersistenceManager;

import com.google.appengine.api.datastore.Text;

public class SaveTags {

	public static void addNew(PersistenceManager persistenceManager, String tags) {

		Tags tagsDatabase = new Tags();

		tagsDatabase.setTagsList(new Text(tags));

		persistenceManager.makePersistent(tagsDatabase);

	}

	public static void update(PersistenceManager persistenceManager,
			net.crowdloud.shared.entities.Tags tags) {

		Tags tagsDatabase = GetTags.getTagsDatabase(persistenceManager);

		tagsDatabase.setTagsList(new Text(tags.getTagsList()));

		persistenceManager.makePersistent(tagsDatabase);
	}

}